import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

// 引入vuex子模块
import home from './home';
import search from './search';
import detail from './detail';
import shopcart from './shopcart';
import user from './user';

const state = {

};

const actions = {

};

const mutations = {

};

const getters = {

}

export default new Vuex.Store({
    state,
    actions,
    mutations,
    getters,
    // 模块化管理子模块
    modules:{
      home,
      search,
      detail,
      shopcart,
      user
    }
})